<template>
  <div class="footer_custom">
    <el-pagination @size-change="handleSizeChange"
                   @current-change="handleCurrentChange"
                   :current-page="currentPage"
                   :page-sizes="[10,20,30,50,100]"
                   :page-size="10"
                   layout="total, sizes, prev, pager, next, jumper"
                   :total="100"
                   background
                   align="center">
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: "FooterCustom",
  data () {
    return {
      currentPage: 1
    };
  },
  methods: {
    handleSizeChange (val) {
      console.log(`每页 ${val} 条`);
      this.$emit("sizeChange", val);
    },
    handleCurrentChange (val) {
      console.log(`当前页: ${val}`);
      this.$emit("currentChange", val);
    }
  }
}
</script>

<style lang="scss" scoped>
.footer_custom {
  padding: 10px 0 20px 0;
}
</style>
